package com.gome.gop.mybatis.rw.datasource;

public class DynamicDataSourceGlobal {
	/**
	 * 自定义类型
	 */
	public final static String HAND = "HAND";
	public final static DynamicDataSourceGlobal READ = new DynamicDataSourceGlobal("READ");
	public final static DynamicDataSourceGlobal WRITE = new DynamicDataSourceGlobal("WRITE");
	private String type;
	private String name;

	private DynamicDataSourceGlobal(String type, String name) {
		this.name = name;
		this.type = type;
	}

	private DynamicDataSourceGlobal(String type) {
		this.type = type;
	}

	public static DynamicDataSourceGlobal builderHand(String name) {
		return new DynamicDataSourceGlobal(HAND, name);
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
}
